import 'package:nyh_motorcade_app/entity/energy_type_entity.dart';

energyTypeEntityFromJson(EnergyTypeEntity data, Map<String, dynamic> json) {
	if (json['dictdataValue'] != null) {
		data.dictdataValue = json['dictdataValue'].toString();
	}
	if (json['dictdataName'] != null) {
		data.dictdataName = json['dictdataName'].toString();
	}
	if (json['dictdataPrefix'] != null) {
		data.dictdataPrefix = json['dictdataPrefix'].toString();
	}
	if (json['dictdataOrder'] != null) {
		data.dictdataOrder = json['dictdataOrder'] is String
				? double.tryParse(json['dictdataOrder'])
				: json['dictdataOrder'].toDouble();
	}
	return data;
}

Map<String, dynamic> energyTypeEntityToJson(EnergyTypeEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['dictdataValue'] = entity.dictdataValue;
	data['dictdataName'] = entity.dictdataName;
	data['dictdataPrefix'] = entity.dictdataPrefix;
	data['dictdataOrder'] = entity.dictdataOrder;
	return data;
}